﻿using System;
using System.ComponentModel.DataAnnotations;
namespace WXY.Course.Model
{
    public class UserInfo
    {
        public int? Code { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        [Display(Name = "用户名")]
        [Required(ErrorMessage = "{0}不能为空")]
        [StringLength(20, ErrorMessage = "{0}的最大长度为{1}")]
        public string Name { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        [Display(Name = "密码")]
        [Required(ErrorMessage = "{0}不能为空")]
        [StringLength(20, ErrorMessage = "{0}的最大长度为{1}")]
        public string Password { get; set; }

        /// <summary>
        /// 真实姓名
        /// </summary>
        [Display(Name = "真实姓名")]
        [Required(ErrorMessage = "{0}不能为空")]
        [StringLength(20, ErrorMessage = "{0}的最大长度为{1}")]
        public string RealName { get; set; }

        /// <summary>
        /// 状态，0-正常，1-已删除
        /// </summary>
        public int State { get; set; }

        public DateTime CreateTime { get; set; }

        public UserInfo CreateUser { get; set; }
    }
    //public enum UserLevel
    //{
    //    [Display(Name = "超级管理员")]
    //    SuperAdmin = 0,

    //    [Display(Name = "普通管理员")]
    //    NormalAdmin = 1
    //}
}